package com.vogue.supplymall.common.domain.dto;

import java.io.Serializable;
import java.util.List;

/**
 * 多单合并支付--订单数据封装DTO
 * @author cy
 */
public class MultiplePayOrderInfo implements Serializable {

    private static final long serialVersionUID = 3634078463033424802L;

    /**
     * 订单id
     */
    private Long orderid;
    
    /**
     * 支付方式集合
     */
    private List<PaymentInfo> paymentList;

    /**
     * @return 订单id
     */
    public Long getOrderid() {
        return orderid;
    }

    /**
     * 设置 订单id
     * @param orderid 订单id
     */
    public void setOrderid(Long orderid) {
        this.orderid = orderid;
    }

    /**
     * @return 支付方式集合
     */
    public List<PaymentInfo> getPaymentList() {
        return paymentList;
    }

    /**
     * 设置 支付方式集合
     * @param paymentList 支付方式集合
     */
    public void setPaymentList(List<PaymentInfo> paymentList) {
        this.paymentList = paymentList;
    }    
    
    /**
     * 字符串格式化
     */
    public String toString() {
        StringBuffer strbuf = new StringBuffer("");
        for (PaymentInfo paymentInfo : paymentList) {
            strbuf.append(paymentInfo.toString()).append(",");
        }
        String paymentListStr = "[";
        if (strbuf.length() > 0) {
            paymentListStr += strbuf.substring(0, strbuf.length() - 1);
        }
        paymentListStr += "]";
        return String.format("{\"orderid\":%d, \"paymentList\":%s}", orderid, paymentListStr);
    }
}
